package com.mayikt.service;

/**
 * StringTable["a","b"] 串池表
 *
 * @ClassName Test010
 * @Author 蚂蚁课堂余胜军 QQ644064779 www.mayikt.com
 * @Version V1.0
 **/
public class Test010 {
    public static void main(String[] args) {
        String m1 = "a";
        String m2 = "b";
        String m3 = "ab";
        String m4 = "b";
        String m5 = m1 + m2; //StringBuilder(m1)+StringBuilder(m2) StringBuilder.toString()
        String m6 = "a" + "b";
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(m1);
        stringBuilder.append(m2);
        stringBuilder.toString();
        System.out.println(m3 == m5); //false
        System.out.println(m6 == m3);
    }
}
